(pp-fill): Cut before parens and dots
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 22 Mar 2024 20:46:28 +0000 (16:46 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 22 Mar 2024 20:46:28 +0000 (16:46 -0400)
commit7269a2f1586733bd03b569608bd77112b2e6487f
tree9acfc5c656863bf6ce482f32e1ca273929e83a59
parentaccd79c93935b50dddfcd6fe7fb6912c80bcddb1
(pp-fill): Cut before parens and dots

The `pp-fill` code sometimes end up generating things like:

    (foo .
         bar)

instead of

    (foo
     .  bar)

so make sure we cut before rather than after the dot (and open
parens while we're at it).

* lisp/emacs-lisp/pp.el (pp-fill): Cut before parens and dots.

* test/lisp/emacs-lisp/pp-tests.el (pp-tests--dimensions): New function.
(pp-tests--cut-before): New test.
lisp/emacs-lisp/pp.el
test/lisp/emacs-lisp/pp-tests.el